package com.lh.web.service.impl.shop;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.github.pagehelper.PageHelper;
import com.lh.common.entity.admin.ActivityShopDetails;
import com.lh.common.entity.admin.ActivityShopOne;
import com.lh.common.entity.admin.BannerShop;
import com.lh.common.utils.PageUtils;
import com.lh.web.dao.admin.ActivityShopOneMapper;
import com.lh.web.service.serviceAdmin.shop.ActivityShopOneService;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

/**
 * @author FH
 * @ClassName: ActivityShopOneServiceImpl
 * @Description: (类作用)
 * @date: 2020-05-12 16:00
 */
@Service
public class ActivityShopOneServiceImpl extends ServiceImpl<ActivityShopOneMapper, ActivityShopOne> implements ActivityShopOneService {

    @Override
    public PageUtils queryActivityShopOneList(Map<String, Object> param, Integer pageNum, Integer pageSize) {
        PageHelper.startPage(pageNum, pageSize);
        List<ActivityShopOne> notices = this.baseMapper.queryActivityShopOneList(param);
        return new PageUtils(notices);
    }

    @Override
    public int insertActivityShopOne(ActivityShopOne activityShopOne) {
        return this.baseMapper.insertActivityShopOne(activityShopOne);
    }

    @Override
    public int updateActivityShopOne(ActivityShopOne activityShopOne) {
        return this.baseMapper.updateActivityShopOne(activityShopOne);
    }

    @Override
    public ActivityShopDetails queryShopOneDetails(Map<String, Object> params) {
        return this.baseMapper.queryShopOneDetails(params);
    }

    @Override
    public ActivityShopOne queryShopOne(Long aid) {
        return this.baseMapper.queryShopOne(aid);
    }

    @Override
    public int updateActivityShopOneStatus(Map<String, Object> params) {
        return this.baseMapper.updateActivityShopOneStatus(params);
    }

    @Override
    public int queryCountShopOne() {
        return this.baseMapper.queryCountShopOne();
    }

    @Override
    public PageUtils getActivityShopList(Map<String, Object> param, Integer pageNum, Integer pageSize) {
        PageHelper.startPage(pageNum, pageSize);
        List<BannerShop> notices = this.baseMapper.getActivityShopList(param);
        return new PageUtils(notices);
    }
}
